package mediator;

import java.util.Observer;

import foundation.FVideoReader;

public class MVideoReader {
	private FVideoReader fVideoReader;
	//Variable added in order to manage the Thread.
        private volatile Thread fVideoReaderThread;
        
	public MVideoReader(String requestUrl) {
		fVideoReader = new FVideoReader(requestUrl);
	}
	
	public void startStreaming() {
            fVideoReaderThread = new Thread(fVideoReader);
            fVideoReaderThread.start();
	}
	
	public void addStatusObserver(Observer obs) {
		fVideoReader.addStatusObserver(obs);
	}
	
	public void deleteStatusObserver(Observer obs) {
		fVideoReader.deleteStatusObserver(obs);
	}
	
	public void addObserver(Observer obs) {
		fVideoReader.addObserver(obs);
	}
	
	public void removeObserver(Observer obs) {
		fVideoReader.deleteObserver(obs);
	}
}
